home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Guided Tour of Multimedia (Second Edition)
/
The Guided Tour of Multimedia (Second Edition).iso
/
trials
/
director
/
evalcopy
/
director.z
/
NAVIGATR.DIR
/
00309_Field_309.txt
< prev
next >
Wrap
Text File
|
1994-06-14
|
4KB
|
121 lines
LUCK.DIR, 1
-- The startMovie handler is called automatically when the movie is started
on startMovie
--We are going to to keep two lists that are used by other handlers
--so we store them in global variables
global masterList, artistList
--These statements delete any previous values held by the
--variables masteList, artistList and defaultList. This also establishes
--these variables to contain lists.
set masterList to []
set artistList to []
set defaultList to []
--These statements set the text size of all the
--text fields used to 10 point and make the bid
--and name entry fields blank, erasing any previous input.
set the textSize of field "name entry field" = 10
set the textSize of field "bid entry field" = 10
set the textSize of field "display winning bids" = 10
set the textSize of field "display winner names" = 10
put EMPTY into field "name entry field"
put EMPTY into field "bid entry field"
--These statements add all the designers to a list
--called designerList. designerList is actually a list
--within a list; each entry for a designer contains a two-member list
--made up of the designer's name and a code for the designer.
--The designer code is also used in the frame markers.
add artistlist, ["Andrew Belschner","Bel0"]
add artistlist, ["Richard Brayton","Bray0"]
add artistlist, ["Glenn Gee","Gee0"]
add artistlist, ["Brian Kenneth Graham","Grah0"]
add artistlist, ["Brian Kane","Kane0"]
add artistlist, ["Alan & Joy Ohashi","Oha0"]
--This statement creates a three member list to provide default bidders.
--Again this is a list containing other lists.
set defaultlist to [["John Doe",300],["Joe Smith",500],["Jane Jones",450]]
--These statements step through the artist lists to make a master list containing
--all the bids and bidders in the default list as if these bidders had
--entered bids for these designer's work
repeat with artistnumb = 1 to count(artistlist)
--These statements extract the designer (artist) code from
--each entry in the artist list.
set currentArtist to getAt(artistlist, artistnumb)
set currentArtistCode to getAt(currentArtist, 2)
--These statements add to a master list entries for each of the members
--of the default list for each of the artist. Therefore we have a master list
--where John Doe, Joe Smith, and Jane Jones all bid the same amount for each of
--the designer's work.
repeat with defaultnumb = 1 to count(defaultlist)
set currentDefault to getAt(defaultList, defaultNumb)
set currentName to getAt(currentDefault,1)
set currentBid to getAt(currentDefault,2)
add (masterlist, [currentArtistCode, currentName, currentBid])
end repeat
end repeat
--This statement sets the keyDownScript to the handler "tallyBid" so
-- that whenever a key is pressed the "tallyBid" handler is executed.
set the keyDownScript = "tallyBid"
--This statement allows sprite 22 to respond immediately when clicked
--rather than waiting for a mouseup
set the immediate of sprite 22 = TRUE
-- We use a special cursor that is stored as a castmember. The cast member
--is a 16 x 16 pixel, 1 bit cast member.
set magcursor to [the number of cast "magnifying glass"]
-- set the cursor of each hot spot sprite to this special cursor.
-- its cast number is stored in the variable magcursor
-- menu bar
set the cursor of sprite 2 = magcursor
-- large designer name sprite
set the cursor of sprite 3 = magcursor
-- small booth icon sprites
set the cursor of sprite 5 = magcursor
set the cursor of sprite 6 = magcursor
set the cursor of sprite 7 = magcursor
set the cursor of sprite 8 = magcursor
set the cursor of sprite 9 = magcursor
set the cursor of sprite 10 = magcursor
-- small furniture icons
set the cursor of sprite 12 = magcursor
set the cursor of sprite 13 = magcursor
set the cursor of sprite 14 = magcursor
set the cursor of sprite 15 = magcursor
-- large furniture icons
set the cursor of sprite 16 = magcursor
set the cursor of sprite 17 = magcursor
-- enter bid sprite
set the cursor of sprite 22 = magcursor
end startMovie